﻿using System.Web.Mvc;
using SilenthinkCommon.Extension;

namespace Web.Areas.My
{
    public class MyAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "My";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.Routes.MapSubDomainRoute(
               "MyDefault", AreaName.ToLower(), // SubDomain
               "{controller}/{action}/{param}", // Url
               new { controller = "Home", action = "Index", param = UrlParameter.Optional }, // Defaults
               new[] { "Web.Areas.My.Controllers" }); // Namespace
        }
    }
}
